#!/bin/bash

#login
echo -n "input you need connet user (username,password) ip address:"; read u_name u_passwd ip_add
lftp -u ${u_name},${u_passwd} ${ip_add} <<EOF
ls
quit
EOF

#put
echo -n "please input you need put file:";read u_file
lftp -u ${u_name},${u_passwd} ${ip_add} <<EOF
ls
put ${u_file} 
ls 
quit
EOF

#get
echo -n "please input you get directory in you client:";read u_dir
echo -n "plesae input you need get file in server:";read u_get
	mkdir -p /backnote &>/dev/null
	cd /backup
	lftp -u ${u_name},${u_passwd} ${ip_add} <<EOF
ls
lcd ${u_dir}
get ${u_get} 
quit
EOF

	

